﻿using System;
namespace Pairingproject2._3.answer
{
    //答题模块--------------------------------------/
    public partial class AnswerClass 
    {
        public  string userAnswer=""; //用户答案
        public  string[] result=new string[1000];//正确的答案
        public  bool TrueFlase = false;//判断答案是否正确
        public void CheckAnswer(int subscript)
        {       
            if (userAnswer== result[subscript])
            {
                Console.WriteLine(" 回答正确!");
                TrueFlase = true;
            }
            else
            {
                Console.WriteLine("回答错误! \n正确的答案是: " + result[subscript] + "\n您的答案:" + userAnswer);
                TrueFlase = false;
            }
        }
    }
}
